Skip to main content

DataBoundControl

The DataBoundControl class provides a base for visual controls that bind to entity data and support validation, data loading, and state comparison.

Properties

NameDescription
ContextMenuColumnKeyThe key of the column associated with the context menu.
CaptionThe caption of the control.
LoadingIndicates whether the control is in a loading state.
ControlIdThe unique identifier of the control.
StyleThe styling properties for the control.
ClientEventsA list of client-side events associated with the control.
ReadOnlyGets or sets whether the control is read-only.
ContextMenuTargetThe target of the context menu.
RequiredGets or sets whether the control requires a value for validation.
DefaultReadOnlyGets or sets the default read-only state of the control.
TitleThe title of the control.
ExecutedServerEventsA list of server events that have been executed.
EntityPathGets or sets the data path used for binding this control to an entity.
NameThe name of the control.
VisibleIndicates whether the control is visible.
ClientVisibleIndicates whether the control is visible on the client side.
IndexableGets or sets whether the control's data is indexable for search and querying.
ServerEventsA list of server-side events associated with the control.
DefaultClientEnabledIndicates whether the control is enabled by default on the client side.
ClientReadOnlyGets or sets whether the control is read-only on the client side, regardless of server state.
ClientEnabledIndicates whether the control is enabled on the client side.
EnabledIndicates whether the control is enabled.
ContextMenuKeyThe key associated with the context menu.
ContainerStyleThe styling properties for the container of the control.
CustomClassNameThe custom CSS class name applied to the control.
SizeGets or sets the layout size configuration for the control.
DefaultEnabledIndicates whether the control is enabled by default.

Constructors

NameDescription
BaseControl()Initializes a new instance of the DataBoundControl class with default values.
DataBoundControl()Initializes a new instance of the DataBoundControl class with empty event lists.

Methods

NameDescription
ScrollTo()Scrolls to the control.
HideLoading()Removes the loading state from the control.
FireClick()Triggers the Click event.
OnInit(sender, e)Raises the Init event.
Hide()Hides the control.
OnPropertyValueGet(sender, e)Raises the PropertyValueGet event.
Show()Makes the control visible.
Equals(other)Determines whether the specified DataBoundControl is equal to the current control.
OnDataLoad(sender, e)Raises the DataLoad event with the provided arguments.
OnRender(sender, e)Raises the Render event.
OnLoad(sender, e)Raises the Load event.
GetProtectedData(isDisabledOrReadOnly)#import (Bimser.CSP.FormControls.Base.ICanProtectData.GetProtectedData(bool)) (shortDescription)
ToggleLoading()Toggles the loading state of the control.
GetDifferences(otherObj)Compares the current instance with another control and returns the differences.
SetPropertyValue(mapping, value)Sets the value of a property specified by a mapping.
ClearDefaultValue()Clears the control’s default value. Can be overridden in derived classes.
OnPropertyChanged(sender, e)Handles the property changed event.
GetValueAsObject()Gets the current value of the control as a generic object. Override to return meaningful data in derived types.
ShowLoading()Sets the control to a loading state.
OnPreRender(sender, e)Raises the PreRender event.
GetDifferences(otherObj)Compares the current control with another and returns a dictionary of differences.
Equals(obj)Determines whether the specified object is equal to the current control.
OnValidating(sender, e)Raises the Validating event with the provided arguments.
OnPropertyChanging(sender, e)Handles the property changing event.
OnDoubleClick(sender, e)Raises the DoubleClick event.
GetData()Gets the control’s current data, including type, text, and value, as a structured object.
IsValid()Returns a value indicating whether the control’s current value is valid.
OnClick(sender, e)Raises the Click event.
GetHashCode()Returns a hash code for the current control instance.

Events

NameDescription
ValidatingRaised before the control's value is validated.
InitTriggered when the control is initialized.
LoadTriggered when the control is loaded.
DoubleClickTriggered when the control is double-clicked.
LazyLoadingRaised when the control initiates a lazy-loading operation to fetch additional data.
PreRenderTriggered before the control is rendered.
PropertyValueGetTriggered when retrieving a control property value.
ClickTriggered when the control is clicked.
DataLoadRaised when external data is loaded into the control.
RenderTriggered when the control is rendered.